/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

package pe.com.sysaut.seguridad.domain;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embeddable;

/**
 *
 * @author ytorres
 */
@Embeddable
public class TopcionesporperfilPK implements Serializable {
    /**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	@Basic(optional = false)
    @Column(name = "id")
    private int id;
    @Basic(optional = false)
    @Column(name = "id_perfil")
    private String idPerfil;
    @Basic(optional = false)
    @Column(name = "id_opcion")
    private short idOpcion;

    public TopcionesporperfilPK() {
    }

    public TopcionesporperfilPK(int id, String idPerfil, short idOpcion) {
        this.id = id;
        this.idPerfil = idPerfil;
        this.idOpcion = idOpcion;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getIdPerfil() {
        return idPerfil;
    }

    public void setIdPerfil(String idPerfil) {
        this.idPerfil = idPerfil;
    }

    public short getIdOpcion() {
        return idOpcion;
    }

    public void setIdOpcion(short idOpcion) {
        this.idOpcion = idOpcion;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (int) id;
        hash += (idPerfil != null ? idPerfil.hashCode() : 0);
        hash += (int) idOpcion;
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof TopcionesporperfilPK)) {
            return false;
        }
        TopcionesporperfilPK other = (TopcionesporperfilPK) object;
        if (this.id != other.id) {
            return false;
        }
        if ((this.idPerfil == null && other.idPerfil != null) || (this.idPerfil != null && !this.idPerfil.equals(other.idPerfil))) {
            return false;
        }
        if (this.idOpcion != other.idOpcion) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "appdomain.TopcionesporperfilPK[ id=" + id + ", idPerfil=" + idPerfil + ", idOpcion=" + idOpcion + " ]";
    }
    
}
